3.1.81 \(\int \frac {(d+i c d x)^2 (a+b \arctan (c x))^2}{x^2} \, dx\) [81]

3.1.81.1 Optimal result
3.1.81.2 Mathematica [A] (verified)
3.1.81.3 Rubi [A] (verified)
3.1.81.4 Maple [C] (warning: unable to verify)
3.1.81.5 Fricas [F]
3.1.81.6 Sympy [F]
3.1.81.7 Maxima [F]
3.1.81.8 Giac [F(-1)]
3.1.81.9 Mupad [F(-1)]

3.1.81.1 Optimal result

Integrand size = 25, antiderivative size = 317 \[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))^2}{x^2} \, dx=-2 i c d^2 (a+b \arctan (c x))^2-\frac {d^2 (a+b \arctan (c x))^2}{x}-c^2 d^2 x (a+b \arctan (c x))^2+4 i c d^2 (a+b \arctan (c x))^2 \text {arctanh}\left (1-\frac {2}{1+i c x}\right )-2 b c d^2 (a+b \arctan (c x)) \log \left (\frac {2}{1+i c x}\right )+2 b c d^2 (a+b \arctan (c x)) \log \left (2-\frac {2}{1-i c x}\right )-i b^2 c d^2 \operatorname {PolyLog}\left (2,-1+\frac {2}{1-i c x}\right )-i b^2 c d^2 \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )+2 b c d^2 (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )-2 b c d^2 (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1+i c x}\right )-i b^2 c d^2 \operatorname {PolyLog}\left (3,1-\frac {2}{1+i c x}\right )+i b^2 c d^2 \operatorname {PolyLog}\left (3,-1+\frac {2}{1+i c x}\right ) \]

output
-2*I*c*d^2*(a+b*arctan(c*x))^2-d^2*(a+b*arctan(c*x))^2/x-c^2*d^2*x*(a+b*ar 
ctan(c*x))^2-4*I*c*d^2*(a+b*arctan(c*x))^2*arctanh(-1+2/(1+I*c*x))-2*b*c*d 
^2*(a+b*arctan(c*x))*ln(2/(1+I*c*x))+2*b*c*d^2*(a+b*arctan(c*x))*ln(2-2/(1 
-I*c*x))-I*b^2*c*d^2*polylog(2,-1+2/(1-I*c*x))-I*b^2*c*d^2*polylog(2,1-2/( 
1+I*c*x))+2*b*c*d^2*(a+b*arctan(c*x))*polylog(2,1-2/(1+I*c*x))-2*b*c*d^2*( 
a+b*arctan(c*x))*polylog(2,-1+2/(1+I*c*x))-I*b^2*c*d^2*polylog(3,1-2/(1+I* 
c*x))+I*b^2*c*d^2*polylog(3,-1+2/(1+I*c*x))
 
3.1.81.2 Mathematica [A] (verified)

Time = 0.68 (sec) , antiderivative size = 378, normalized size of antiderivative = 1.19 \[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))^2}{x^2} \, dx=-\frac {d^2 \left (12 a^2-b^2 c \pi ^3 x+12 a^2 c^2 x^2+24 a b \arctan (c x)+24 a b c^2 x^2 \arctan (c x)+12 b^2 \arctan (c x)^2+12 b^2 c^2 x^2 \arctan (c x)^2+16 b^2 c x \arctan (c x)^3-24 i b^2 c x \arctan (c x)^2 \log \left (1-e^{-2 i \arctan (c x)}\right )-24 b^2 c x \arctan (c x) \log \left (1-e^{2 i \arctan (c x)}\right )+24 b^2 c x \arctan (c x) \log \left (1+e^{2 i \arctan (c x)}\right )+24 i b^2 c x \arctan (c x)^2 \log \left (1+e^{2 i \arctan (c x)}\right )-24 i a^2 c x \log (c x)-24 a b c x \log (c x)+24 b^2 c x \arctan (c x) \operatorname {PolyLog}\left (2,e^{-2 i \arctan (c x)}\right )+12 b^2 c x (-i+2 \arctan (c x)) \operatorname {PolyLog}\left (2,-e^{2 i \arctan (c x)}\right )+12 i b^2 c x \operatorname {PolyLog}\left (2,e^{2 i \arctan (c x)}\right )+24 a b c x \operatorname {PolyLog}(2,-i c x)-24 a b c x \operatorname {PolyLog}(2,i c x)-12 i b^2 c x \operatorname {PolyLog}\left (3,e^{-2 i \arctan (c x)}\right )+12 i b^2 c x \operatorname {PolyLog}\left (3,-e^{2 i \arctan (c x)}\right )\right )}{12 x} \]

input
Integrate[((d + I*c*d*x)^2*(a + b*ArcTan[c*x])^2)/x^2,x]
 
output
-1/12*(d^2*(12*a^2 - b^2*c*Pi^3*x + 12*a^2*c^2*x^2 + 24*a*b*ArcTan[c*x] + 
24*a*b*c^2*x^2*ArcTan[c*x] + 12*b^2*ArcTan[c*x]^2 + 12*b^2*c^2*x^2*ArcTan[ 
c*x]^2 + 16*b^2*c*x*ArcTan[c*x]^3 - (24*I)*b^2*c*x*ArcTan[c*x]^2*Log[1 - E 
^((-2*I)*ArcTan[c*x])] - 24*b^2*c*x*ArcTan[c*x]*Log[1 - E^((2*I)*ArcTan[c* 
x])] + 24*b^2*c*x*ArcTan[c*x]*Log[1 + E^((2*I)*ArcTan[c*x])] + (24*I)*b^2* 
c*x*ArcTan[c*x]^2*Log[1 + E^((2*I)*ArcTan[c*x])] - (24*I)*a^2*c*x*Log[c*x] 
 - 24*a*b*c*x*Log[c*x] + 24*b^2*c*x*ArcTan[c*x]*PolyLog[2, E^((-2*I)*ArcTa 
n[c*x])] + 12*b^2*c*x*(-I + 2*ArcTan[c*x])*PolyLog[2, -E^((2*I)*ArcTan[c*x 
])] + (12*I)*b^2*c*x*PolyLog[2, E^((2*I)*ArcTan[c*x])] + 24*a*b*c*x*PolyLo 
g[2, (-I)*c*x] - 24*a*b*c*x*PolyLog[2, I*c*x] - (12*I)*b^2*c*x*PolyLog[3, 
E^((-2*I)*ArcTan[c*x])] + (12*I)*b^2*c*x*PolyLog[3, -E^((2*I)*ArcTan[c*x]) 
]))/x
 
3.1.81.3 Rubi [A] (verified)

Time = 0.81 (sec) , antiderivative size = 317, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {5411, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(d+i c d x)^2 (a+b \arctan (c x))^2}{x^2} \, dx\)

\(\Big \downarrow \) 5411

\(\displaystyle \int \left (-c^2 d^2 (a+b \arctan (c x))^2+\frac {d^2 (a+b \arctan (c x))^2}{x^2}+\frac {2 i c d^2 (a+b \arctan (c x))^2}{x}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle 4 i c d^2 \text {arctanh}\left (1-\frac {2}{1+i c x}\right ) (a+b \arctan (c x))^2-c^2 d^2 x (a+b \arctan (c x))^2+2 b c d^2 \operatorname {PolyLog}\left (2,1-\frac {2}{i c x+1}\right ) (a+b \arctan (c x))-2 b c d^2 \operatorname {PolyLog}\left (2,\frac {2}{i c x+1}-1\right ) (a+b \arctan (c x))-2 i c d^2 (a+b \arctan (c x))^2-\frac {d^2 (a+b \arctan (c x))^2}{x}-2 b c d^2 \log \left (\frac {2}{1+i c x}\right ) (a+b \arctan (c x))+2 b c d^2 \log \left (2-\frac {2}{1-i c x}\right ) (a+b \arctan (c x))-i b^2 c d^2 \operatorname {PolyLog}\left (2,\frac {2}{1-i c x}-1\right )-i b^2 c d^2 \operatorname {PolyLog}\left (2,1-\frac {2}{i c x+1}\right )-i b^2 c d^2 \operatorname {PolyLog}\left (3,1-\frac {2}{i c x+1}\right )+i b^2 c d^2 \operatorname {PolyLog}\left (3,\frac {2}{i c x+1}-1\right )\)

input
Int[((d + I*c*d*x)^2*(a + b*ArcTan[c*x])^2)/x^2,x]
 
output
(-2*I)*c*d^2*(a + b*ArcTan[c*x])^2 - (d^2*(a + b*ArcTan[c*x])^2)/x - c^2*d 
^2*x*(a + b*ArcTan[c*x])^2 + (4*I)*c*d^2*(a + b*ArcTan[c*x])^2*ArcTanh[1 - 
 2/(1 + I*c*x)] - 2*b*c*d^2*(a + b*ArcTan[c*x])*Log[2/(1 + I*c*x)] + 2*b*c 
*d^2*(a + b*ArcTan[c*x])*Log[2 - 2/(1 - I*c*x)] - I*b^2*c*d^2*PolyLog[2, - 
1 + 2/(1 - I*c*x)] - I*b^2*c*d^2*PolyLog[2, 1 - 2/(1 + I*c*x)] + 2*b*c*d^2 
*(a + b*ArcTan[c*x])*PolyLog[2, 1 - 2/(1 + I*c*x)] - 2*b*c*d^2*(a + b*ArcT 
an[c*x])*PolyLog[2, -1 + 2/(1 + I*c*x)] - I*b^2*c*d^2*PolyLog[3, 1 - 2/(1 
+ I*c*x)] + I*b^2*c*d^2*PolyLog[3, -1 + 2/(1 + I*c*x)]
 

3.1.81.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 5411
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_ 
.)*(x_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*ArcTan[c*x])^p, (f* 
x)^m*(d + e*x)^q, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[p, 0] & 
& IntegerQ[q] && (GtQ[q, 0] || NeQ[a, 0] || IntegerQ[m])
 
3.1.81.4 Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 13.94 (sec) , antiderivative size = 5048, normalized size of antiderivative = 15.92

method result size
parts \(\text {Expression too large to display}\) \(5048\)
derivativedivides \(\text {Expression too large to display}\) \(5050\)
default \(\text {Expression too large to display}\) \(5050\)

input
int((d+I*c*d*x)^2*(a+b*arctan(c*x))^2/x^2,x,method=_RETURNVERBOSE)
 
output
result too large to display
 
3.1.81.5 Fricas [F]

\[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))^2}{x^2} \, dx=\int { \frac {{\left (i \, c d x + d\right )}^{2} {\left (b \arctan \left (c x\right ) + a\right )}^{2}}{x^{2}} \,d x } \]

input
integrate((d+I*c*d*x)^2*(a+b*arctan(c*x))^2/x^2,x, algorithm="fricas")
 
output
integral(-1/4*(4*a^2*c^2*d^2*x^2 - 8*I*a^2*c*d^2*x - 4*a^2*d^2 - (b^2*c^2* 
d^2*x^2 - 2*I*b^2*c*d^2*x - b^2*d^2)*log(-(c*x + I)/(c*x - I))^2 + 4*(I*a* 
b*c^2*d^2*x^2 + 2*a*b*c*d^2*x - I*a*b*d^2)*log(-(c*x + I)/(c*x - I)))/x^2, 
 x)
 
3.1.81.6 Sympy [F]

\[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))^2}{x^2} \, dx=- d^{2} \left (\int a^{2} c^{2}\, dx + \int \left (- \frac {a^{2}}{x^{2}}\right )\, dx + \int b^{2} c^{2} \operatorname {atan}^{2}{\left (c x \right )}\, dx + \int \left (- \frac {b^{2} \operatorname {atan}^{2}{\left (c x \right )}}{x^{2}}\right )\, dx + \int \left (- \frac {2 i a^{2} c}{x}\right )\, dx + \int 2 a b c^{2} \operatorname {atan}{\left (c x \right )}\, dx + \int \left (- \frac {2 a b \operatorname {atan}{\left (c x \right )}}{x^{2}}\right )\, dx + \int \left (- \frac {2 i b^{2} c \operatorname {atan}^{2}{\left (c x \right )}}{x}\right )\, dx + \int \left (- \frac {4 i a b c \operatorname {atan}{\left (c x \right )}}{x}\right )\, dx\right ) \]

input
integrate((d+I*c*d*x)**2*(a+b*atan(c*x))**2/x**2,x)
 
output
-d**2*(Integral(a**2*c**2, x) + Integral(-a**2/x**2, x) + Integral(b**2*c* 
*2*atan(c*x)**2, x) + Integral(-b**2*atan(c*x)**2/x**2, x) + Integral(-2*I 
*a**2*c/x, x) + Integral(2*a*b*c**2*atan(c*x), x) + Integral(-2*a*b*atan(c 
*x)/x**2, x) + Integral(-2*I*b**2*c*atan(c*x)**2/x, x) + Integral(-4*I*a*b 
*c*atan(c*x)/x, x))
 
3.1.81.7 Maxima [F]

\[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))^2}{x^2} \, dx=\int { \frac {{\left (i \, c d x + d\right )}^{2} {\left (b \arctan \left (c x\right ) + a\right )}^{2}}{x^{2}} \,d x } \]

input
integrate((d+I*c*d*x)^2*(a+b*arctan(c*x))^2/x^2,x, algorithm="maxima")
 
output
-a^2*c^2*d^2*x - (2*c*x*arctan(c*x) - log(c^2*x^2 + 1))*a*b*c*d^2 + 2*I*a^ 
2*c*d^2*log(x) - (c*(log(c^2*x^2 + 1) - log(x^2)) + 2*arctan(c*x)/x)*a*b*d 
^2 - a^2*d^2/x + 1/16*(8*b^2*c^2*d^2*x^2 - 2*b^2*c^2*d^2*x*integrate(4*arc 
tan(c*x)^2 + log(c^2*x^2 + 1)^2, x) + 4*I*b^2*c^2*d^2*x*integrate(-1/4*(8* 
(c^2*x^2 + 1)*c*x*arctan(c*x)^2 - 2*(c^2*x^2 + 1)*c*x*log(c^2*x^2 + 1)^2 + 
 8*(c^2*x^2 + 1)*arctan(c*x)*log(c^2*x^2 + 1) - (4*(c^2*x^2 + 1)^(3/2)*arc 
tan(c*x)*cos(2*arctan(c*x))*log(c^2*x^2 + 1) + 4*sqrt(c^2*x^2 + 1)*arctan( 
c*x)*log(c^2*x^2 + 1) + (4*(c^2*x^2 + 1)^(3/2)*arctan(c*x)^2 - (c^2*x^2 + 
1)^(3/2)*log(c^2*x^2 + 1)^2)*sin(2*arctan(c*x)))*sqrt(c^2*x^2 + 1))/((c^2* 
x^2 + 1)^3*cos(2*arctan(c*x))^2 + (c^2*x^2 + 1)^3*sin(2*arctan(c*x))^2 + c 
^2*x^2 + 2*(c^2*x^2 + 1)^2*cos(2*arctan(c*x)) + 4*(c^2*x^2 + 1)^2 - 4*((c^ 
2*x^2 + 1)^(3/2)*c*x*sin(2*arctan(c*x)) + (c^2*x^2 + 1)^(3/2)*cos(2*arctan 
(c*x)) + sqrt(c^2*x^2 + 1))*sqrt(c^2*x^2 + 1) + 1), x) - 4*b^2*c^2*d^2*x*i 
ntegrate(1/4*(8*(c^2*x^2 + 1)*c*x*arctan(c*x)*log(c^2*x^2 + 1) - 8*(c^2*x^ 
2 + 1)*arctan(c*x)^2 + 2*(c^2*x^2 + 1)*log(c^2*x^2 + 1)^2 - (4*(c^2*x^2 + 
1)^(3/2)*arctan(c*x)*log(c^2*x^2 + 1)*sin(2*arctan(c*x)) - 4*sqrt(c^2*x^2 
+ 1)*arctan(c*x)^2 + sqrt(c^2*x^2 + 1)*log(c^2*x^2 + 1)^2 - (4*(c^2*x^2 + 
1)^(3/2)*arctan(c*x)^2 - (c^2*x^2 + 1)^(3/2)*log(c^2*x^2 + 1)^2)*cos(2*arc 
tan(c*x)))*sqrt(c^2*x^2 + 1))/((c^2*x^2 + 1)^3*cos(2*arctan(c*x))^2 + (c^2 
*x^2 + 1)^3*sin(2*arctan(c*x))^2 + c^2*x^2 + 2*(c^2*x^2 + 1)^2*cos(2*ar...
 
3.1.81.8 Giac [F(-1)]

Timed out. \[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))^2}{x^2} \, dx=\text {Timed out} \]

input
integrate((d+I*c*d*x)^2*(a+b*arctan(c*x))^2/x^2,x, algorithm="giac")
 
output
Timed out
 
3.1.81.9 Mupad [F(-1)]

Timed out. \[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))^2}{x^2} \, dx=\int \frac {{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2\,{\left (d+c\,d\,x\,1{}\mathrm {i}\right )}^2}{x^2} \,d x \]

input
int(((a + b*atan(c*x))^2*(d + c*d*x*1i)^2)/x^2,x)
 
output
int(((a + b*atan(c*x))^2*(d + c*d*x*1i)^2)/x^2, x)